<%--
  Created by IntelliJ IDEA.
  User: Lenovo
  Date: 2024/10/16
  Time: 10:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>德先生去旅行</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      background-color: #f4f4f4;
      margin: 0;
      padding: 0;
    }
    .container {
      width: 80%;
      margin: 50px auto;
      background-color: #fff;
      padding: 20px;
      border-radius: 8px;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    h2 {
      color: #333;
      text-align: center;
    }
    .form-group {
      margin-bottom: 20px;
    }
    label {
      display: block;
      margin-bottom: 5px;
      color: #666;
    }
    input[type="hidden"] {
      display: none;
    }
    a {
      color: #007bff;
      text-decoration: none;
    }
    a:hover {
      text-decoration: underline;
    }
    select {
      width: 100%;
      padding: 8px;
      margin-bottom: 10px;
      border: 1px solid #ccc;
      border-radius: 4px;
    }
    input[type="submit"] {
      background-color: #007bff;
      color: white;
      padding: 10px 20px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 16px;
    }
    input[type="submit"]:hover {
      background-color: #0056b3;
    }
  </style>
</head>
<body>
<div class="container">
  <h2>航班订票系统</h2>
  <form action="/booking" method="post">
    <div class="form-group">
      <label>姓名:</label>
      <input type="hidden" value="${userEntity.name}" name="name">
      <a>${userEntity.name}</a>
    </div>
    <div class="form-group">
      <label>出发地:</label>
      <input type="hidden" value="${flightEntity.departureAirport}" name="departureAirport">
      <a>${flightEntity.departureAirport}</a>
    </div>
    <div class="form-group">
      <label>目的地:</label>
      <input type="hidden" value="${flightEntity.arriveAirport}" name="arriveAirport" required>
      <a>${flightEntity.arriveAirport}</a>
    </div>
    <div class="form-group">
      <label>出发日期:</label>
      <input type="hidden" value="${flightEntity.departureTime}" name="departureTime" required>
      <a>${flightEntity.departureTime}</a>
    </div>
    <div class="form-group">
      <label for="class">舱位等级:</label>
      <select id="class" name="class">
        <option value="economy">经济舱</option>
        <option value="business">商务舱</option>
        <option value="first">头等舱</option>
      </select>
    </div>
    <input type="submit" value="购买">
  </form>
</div>
</body>
</html>
